﻿using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Wicture.DbRESTFul;
using Wicture.DbRESTFul.Rpc.Client;
using Wicture.QPZS.EPC.Repository;

namespace Wicture.QPZS.EPC.Services.UserAuth.Base
{
    public class BaseUserAuthProcessor
    {
        /// <summary>
        /// vin查询后续扣费操作
        /// </summary>
        /// <param name="repository"></param>
        /// <param name="brandCode"></param>
        /// <param name="vin"></param>
        /// <param name="modelName"></param>
        public virtual void HandleVinQueryResult(RpcRepository repository, JObject vinInfo) { }
        /// <summary>
        /// 处理零件列表页结果
        /// </summary>
        /// <param name="repository"></param>
        /// <param name="data"></param>
        /// <param name="brandCode"></param>
        public virtual void HandlePartListResult(RpcRepository repository, JArray data, string brandCode) { }

        /// <summary>
        /// 零件列表页预处理
        /// </summary>
        /// <param name="repository"></param>
        /// <param name="brandCode"></param>
        public virtual void PartListPreProcess(EpcRepository repository, string brandCode) { }
        /// <summary>
        /// 零件详情页结果
        /// </summary>
        /// <param name="repository"></param>
        /// <param name="data"></param>
        /// <param name="brandCode"></param>
        public virtual void HandlePartDetailResult(IDbRESTFulRepository repository, JObject data, string brandCode) { }
        /// <summary>
        /// 更新并查询用户每日配件查询次数
        /// </summary>
        /// <param name="repository"></param>
        /// <param name="brandCode"></param>
        public virtual void CheckSearchPartTimes(IDbRESTFulRepository repository, string brandCode, string keyword) { }
        /// <summary>
        /// 更新并查询用户每日配件查询个数
        /// </summary>
        /// <param name="repository"></param>
        /// <param name="times"></param>
        /// <param name="brandCode"></param>
        public virtual void CheckSearhPartCounts(IDbRESTFulRepository repository, int times, string brandCode) { }
        /// <summary>
        /// 零件查询结果处理
        /// </summary>
        /// <param name="repository"></param>
        /// <param name="data"></param>
        public virtual void BuildPartSearchResult(IDbRESTFulRepository repository, JObject data) { }
        /// <summary>
        /// 处理主组结果
        /// </summary>
        /// <param name="repository"></param>
        /// <param name="data"></param>
        public virtual void HandleMaingroupQueryResult(IDbRESTFulRepository repository, JObject data) { }
    }
}
